// 2025/3/24
// 拼三角

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main() {
    int t; cin >> t;
    vector<int> lens(6);
    while(t--)
    {
        bool flag = false;
        for(auto& e : lens) cin >> e;
        sort(lens.begin(), lens.end());
        do
        {
            int a = lens[0], b = lens[1], c = lens[2];
            int d = lens[3], e = lens[4], f = lens[5];
            if(a + b > c && b + c > a && a + c > b 
            && d + e > f && e + f > d && d + f > e)
            {
                flag = true;
                break;
            }
        }while(next_permutation(lens.begin(), lens.end()));

        if(flag)
            cout << "Yes" << endl;
        else
            cout << "No" << endl;
    }
}
// 64 位输出请用 printf("%lld")